<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />


        <script type="text/css">
            .roleclass { color:#fff;}
            .objectclass { color:#fff;}
        </script>

        <script type="text/javascript">
            //var i = 0;
            function addp()
            {
                var i = $(".autocomplete").length;
                //alert("i = "+i);
                if (i < 4)
                {
                    i++;
                }
                else
                {
                    alert('up to four!');
                    return;
                }
                //alert("i = "+i);
                str = '<p id="p' + i + '">'
                    +'<input type="text" size="39"  placeholder="<?= translate('PLASE_INPUT_ITEM') ?>" '
                    +' name="row[item][]" id="itemid' + i + '" class="autocomplete" table="type_object" autocomplete="off" >'
                    +'<input type="text" size="8" placeholder="<?= translate('PLASE_INPUT_AMOUNT') ?>" '
                    +' name="row[amount][]" id="num' + i + '" >'
                    +'</p>';
                //alert(" str = "+str);
                $("#add").append(str);
                autocomplete();

                $("#num"+i).formValidator({empty: false, onshow: '<?= translate('MAIL_TIME_LIMIT_MIN_MAX') ?>'})
                    .inputValidator({type: 'number', min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});

            }
            function removep()
            {
                var i = $(".autocomplete").length;
                //alert("i = "+i);
                if (i > 0)
                {
                    $("#p" + i).remove();
                }

            }
        </script>
    </head>
    <body>

        <?php include(VIEWPATH . 'common/main_header.php'); ?> 
        <form action="" method="POST" id="rowForm">
            <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablegrid tableedit">
                <tr><td><?= translate('ROLE_ID_NAME') ?>:</td><td><input type="text" name="row[role_id]" id="roleid" size="100" /></td></tr>

                <tr><td></td><td><input type="submit" value="<?= translate('SUBMIT') ?>" id="submit"/> <input type="reset" value="<?= translate('RESET') ?>" id="reset"/></td></tr>
            </table>
        </form>
        <script type="text/javascript">
            SG.init("core.form", function() {
            });
        </script>
    </body>
</html>
